|
ws2812 library
v0.85
Supports ws2812 and ws2812b
|
Driver for WS2812 and WS2812B RGB LEDs. More...
Data Structures | |
| struct | ws2812_hdr |
Functions | |
| int | ws_start (ws2812_t *state, int usreset, int ns0h, int ns0l, int ns1h, int ns1l, int type) |
| Load a COG with a driver using custom parameters. | |
| void | ws2812_set (ws2812_t *state, int pin, uint32_t *colors, int count) |
| Set color pattern on a chain of LEDs. | |
Driver for WS2812 and WS2812B RGB LEDs.
| void ws2812_set | ( | ws2812_t * | driver, |
| int | pin, | ||
| uint32_t * | colors, | ||
| int | count | ||
| ) |
Set color pattern on a chain of LEDs.
| driver | Pointer to the driver structure |
| pin | Pin connected to the first LED |
| colors | Array of colors, one for each LED in the chain |
| count | Number of LEDs in the chain |
| int ws_start | ( | ws2812_t * | driver, |
| int | usreset, | ||
| int | ns0h, | ||
| int | ns0l, | ||
| int | ns1h, | ||
| int | ns1l, | ||
| int | type | ||
| ) |
Load a COG with a driver using custom parameters.
| usreset | Reset timing (us) |
| ns0h | 0-bit high timing (ns) |
| ns0l | 0-bit low timing (ns) |
| ns1h | 1-bit high timing (ns) |
| ns1l | 1-bit low timing (ns) |
| type | color format (either TYPE_RGB or TYPE_GRB) |
1.8.1.2